﻿<%@ Page Language="C#"  Inherits="E.Web.Teacher.statistics.CourseAnalysis2" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>课程满意度分析</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/Common.js"></script>
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript" src="/js/ajax.js"></script>
  <script type="text/javascript" src="/js/CheckBox.js"></script>
  <script type="text/javascript">
    SetCheckBoxProperty("SltAllbtn", "p_chkb");
    function Sub() {
      if (confirm("确定要导出所选项目吗？")) {
        var arr = [];
        var chblist = document.getElementsByName("p_chkb");
        for (var i = 0; i < chblist.length; i++) {
          if (chblist[i].checked) {
            arr.push(chblist[i].value);
          }
        }
        if (arr.length == 0) {
          alert("未选择任何项目吗");
        } else {
          document.getElementById("arrv").value = arr;
          document.getElementById("form1").action = "/statistics/Export2Xls2.aspx";
          document.getElementById("form1").submit();
        }
      }
    }
  </script>
  <style type="text/css">
      .d_cb{ float:left; width:60px; }
      .d_cc{ float:left; width:100px; }
      .d_tn{ float:left; width:100px; }
      .d_cern{ float:left; width:100px; }
      .d_coun{ float:left; width:110px; }
      .d_an{ float:left; width:60px; }
      .d_uc{ float:left; width:60px; }
      .d_ac{ float:left; width:60px; }
  </style>
</head>
<body>
  <form id="form1" method="post" action="?act=s">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;课程满意度分析</div>
      </div>
      <div class="spe_line_2"></div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">班级编号：</div>
        <div class="fl"><input type="text" id="ClassCodeTxt" name="ClassCodeTxt" style="width:200px;" value="<%=classCode %>" /></div>
        <% if (authority == E.Enum.EnumTeacherAuthority.Admin) { %>
        <div class="fl" style="line-height:23px;">&nbsp;教师姓名：</div>
        <div class="fl"><input type="text" id="TeacherNameTxt" name="TeacherNameTxt" style="width:200px;" value="<%=teacherName %>" /></div>
        <% } %>
      </div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">培训机构：</div>
        <div class="fl">
          <% if (areaList != null && areaList.Count > 0) { %>
          <select id="AreaSlt" name="AreaSlt">
            <option value="-1">请选择</option>
            <% foreach (DictAreaModel areaModel in areaList) { %>
            <option value="<%=areaModel.ID %>"><%=areaModel.Name%></option>
            <% } %>
          </select>
          <% } %>
        </div>
        <div class="fl" style="line-height:23px;">&nbsp;课程名称：</div>
        <div class="fl">
          <% if (courseList != null && courseList.Count > 0) { %>
          <select id="CourseSlt" name="CourseSlt">
            <option value="-1">请选择</option>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in courseList) { %>
            <option value="<%=kvp.Key %>"><%=kvp.Value %></option>
            <% } %>
          </select>
          <% } %>
        </div>
        <div class="fl">&nbsp;&nbsp;<input type="image" style="width:54px; height:23px;" src="/images/btn/search.gif" /></div>
      </div>
    </div>
    
    <div class="block" style="height:340px; display:table;">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;搜索结果</div>
      </div>
      <div class="spe_line_2"></div>
      
    <% if (dataList != null && dataList.Count > 0) { %>
    
      <div id="datatable">
        <div class="data_rows" style="font-weight:bolder;">
          <div class="d_cb"><input type="checkbox" id="SltAllbtn" onclick="SelectAllCheckBox();" class="chkb" /></div>
          <div class="d_cc">班级编号</div>
          <div class="d_tn">教师姓名</div>
          <div class="d_cern">认证名称</div>
          <div class="d_coun">课程名称</div>
          <div class="d_an">地区</div>
          <div class="d_uc">班级人数</div>
          <div class="d_ac">参与人数</div>
        </div>
        
        <% foreach (ClassUserCountModel model in dataList) { %>
        <div class="data_rows">
          <div class="d_cb"><input type="checkbox" id="chkb_<%=model.ClassID %>" name="p_chkb" value="<%=model.ClassID %>" class="chkb" onclick="SelectThis();" /></div>
          <div class="d_cc"><%=model.ClassCode %></div>
          <div class="d_tn"><%=model.TeacherName %></div>
          <div class="d_cern"><%=model.CertificateName %></div>
          <div class="d_coun"><%=model.CourseName %></div>
          <div class="d_an"><%=model.AreaName %></div>
          <div class="d_uc"><%=model.UserCount %></div>
          <div class="d_ac"><%=model.AttendedUserCount %></div>
        </div>
        <% } %>
        
      </div>
      
      <div style="width:650px; display:table;">
        <div class="fr" style="margin:8px 0 0 0;"><%=mypager%></div>
      </div>
      <div style="margin:8px 0 0 0;">
        <input type="hidden" id="arrv" name="arrv" /><a href="javascript:Sub();">导出所选项目数据</a>
      </div>
      
    <% } else { %>
    <% } %>
    
    </div>
    <% if (act == "s") { %>
    <script type="text/javascript">
      document.getElementById("CourseSlt").value = '<%=courseid %>';
      document.getElementById("AreaSlt").value = '<%=areaid %>';
    </script>
    <% } %>
  </form>
</body>
</html>
